class LeechdomsController < ApplicationController
  #before_filter :login_required, :except => [:index]
  #before_filter :login_required, :only => [ :edit, :update ]
  #To skip this in a subclassed controller
  #skip_before_filter :login_required
  
  layout "main"
  
  # GET /leechdoms
  # GET /leechdoms.xml
  def index
    @body_id = "leechdoms"
    @leechdoms = Leechdom.paginate  :page => params[:page], :per_page => 30, :conditions => ["proprietary_name like ?","%#{params[:keyword]}%"]
    @categories = Category.find(:all, :conditions => ["parent_id is null"])
    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @leechdoms }
    end
  end

  # GET /leechdoms/1
  # GET /leechdoms/1.xml
  def show
    @body_id = "leechdoms"
    @leechdom = Leechdom.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @leechdom }
    end
  end
  
end
